package com.xunk.equipment.influxdb;

/**
 * 请勿删除，influxdb参考API使用
 */
//@Service
public class InfluxDBService {

//    @Autowired
//    InfluxCustomMapper customMapper;
//
//    public void save(OrderPaymentVO product) {
//        OrderPayment orderPayment = new OrderPayment();
//        BeanUtil.copy(product, orderPayment);
//        customMapper.save(orderPayment);
//    }
//
//    public List<OrderPaymentVO> queryAll() {
//        List<OrderPayment> products = customMapper.query(OrderPayment.class);
//        return Optional.ofNullable(products).orElseGet(ArrayList::new).stream().map(item -> {
//            OrderPaymentVO vo = new OrderPaymentVO();
//            BeanUtil.copy(item, vo);
//            return vo;
//        }).collect(Collectors.toList());
//
//    }
//
//
//    public List<OrderPaymentVO> query(Integer batchId) {
//        String sql = String.format("%s %s", "select * from order_payment where batch_id = ", batchId);
//        System.out.println(sql);
//        Query query = new Query(sql, "paramter_db");
//        List<OrderPayment> products = customMapper.query(query, OrderPayment.class);
//        return Optional.ofNullable(products).orElseGet(ArrayList::new).stream().map(item -> {
//            OrderPaymentVO vo = new OrderPaymentVO();
//            BeanUtil.copy(item, vo);
//            return vo;
//        }).collect(Collectors.toList());
//    }


}
